﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true" CodeBehind="ModifyMemberGroup.aspx.cs" Inherits="HTTT.admin.adgroup.ModifyMemberGroup" %>



<asp:Content ID="Content1" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="toolbar-box">
        <div class="m">
            <div id="toolbar" class="toolbar-list">
                <ul>
                    <li id="toolbar-save" class="button">
                        <asp:LinkButton ID="btnSaveClose" runat="server" OnClick="btnSaveClose_Click">
                    <span class="icon-32-save"></span>Save &amp; Close </asp:LinkButton></li>
                    <li class="divider"></li>
                    <li id="toolbar-cancel" class="button">
                        <asp:LinkButton ID="btnCancel" runat="server"  OnClick="btnCancel_Click">
                    <span class="icon-32-cancel"></span>Cancel </asp:LinkButton></li>
                    <li class="divider"></li>
                </ul>
                <div class="clr">
                </div>
            </div>
            <div class="pagetitle icon-48-article-add">
                <h2>
                    <asp:Label ID="lblTitle" runat="server" Text="">Sửa thành viên Group</asp:Label></h2>
            </div>
        </div>
    </div>

    <div id="element-box">
        <div class="m">
            
            <!-- Thong tin yeu cau -->
            <div class="width-100 fltlft">
                <fieldset class="adminform">
                    <legend>Thông tin yêu cầu</legend>
                    <ul class="adminformlist">
                        <li>
                            <label id="Label24" for="jform_title" class="hasTip required" title="">
                                Thực hiện theo yêu cầu<span class="star">&nbsp;*</span></label>
                            <asp:TextBox ID="txtFromRequest" runat="server" TextMode="MultiLine" Rows="3"></asp:TextBox>
                        </li>
                    </ul>
                </fieldset>
            </div>

            <!-- Tìm kiem user -->
            <div class="width-50 fltlft">
            <fieldset id="adminform">
            <legend>Tìm kiếm người dùng</legend>
                <div class="filter-search fltlft">
                    <label for="filter_search" class="filter-search-lbl">
                        Chọn:</label>
                    <asp:DropDownList ID="ddlOUSearch" runat="server">
                    </asp:DropDownList>
                    <asp:TextBox ID="txtKeyword" runat="server"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="Lọc" OnClick="btnSearch_Click" />
                    <asp:Label ID="lblMsg" runat="server" ForeColor="Red" Text=""></asp:Label>
                </div>
                <div class="filter-select fltrt">
                </div>
            
            <div class="clr"></div>
            
            <table class="adminlist">
                <thead>
                    <tr>
                        <th width="20%">
                            <a title="Click to sort by this column" onclick="" href="#">Tên đăng nhập</a>
                        </th>
                        <th width="20%" class="title">
                            <a title="Click to sort by this column" onclick="" href="#">Họ và tên</a>
                        </th>
                        <th>
                            <a title="Click to sort by this column" onclick="" href="#">Kích hoạt</a>
                        </th>
                        <th>
                            <a title="Click to sort by this column" onclick="" href="#">Chức vụ</a>
                        </th>
                        <th>
                            <a title="Click to sort by this column" onclick="" href="#">Đơn vị</a>
                        </th>
                        <th width="10%">
                            <a title="Click to sort by this column" onclick="" href="#">Thêm vào group</a>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <asp:Repeater ID="rptUserSearch" runat="server" 
                        onitemcommand="rptUserSearch_ItemCommand">
                        <ItemTemplate>
                            <tr class="row<%# Container.ItemIndex%2 %>">
                                <td>
                                    <a href='EditUser.aspx?ID=<%#Eval("sAMAccountName") %>' target="_blank">
                                        <%#Eval("sAMAccountName") %></a>
                                </td>
                                <td>
                                    <a href='EditUser.aspx?ID=<%#Eval("sAMAccountName") %>'target="_blank">
                                        <%#Eval("displayName")%>
                                    </a>
                                </td>
                                <td class="center">
                                    <a class="jgrid" title="Unpublish the menu item alias" href=""><span class='state <%#(((long)Eval("userAccountControl")&HTTT.Utilities.Constants.ADS_UF_ACCOUNT_DISABLE)>0)?"unpublish":"public" %> publish'>
                                    </span></a>
                                </td>
                                <td class="center">
                                    <%#Eval("title") %>
                                </td>
                                <td class="center">
                                    <%#Eval("department") %>
                                </td>
                                <td class="center">
                                    <asp:HiddenField ID="hfSearchUsername" Value='<%#Eval("sAMAccountName") %>' runat="server" />
                                    <asp:LinkButton ID="btnAdd2Group" CommandName="Add2Group" runat="server">Thêm vào Group</asp:LinkButton>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>

            </fieldset>
            <div class="clr"></div>
            </div>

            <!-- Danh sách user -->
            <div class="width-50 fltlft">
            <fieldset class="adminform">
                    <legend>Thành viên trong group</legend>
            <table class="adminlist">
                <thead>
                    <tr>
                        <th width="20%">
                            <a title="Click to sort by this column" onclick="" href="#">Tên đăng nhập</a>
                        </th>
                        <th width="20%" class="title">
                            <a title="Click to sort by this column" onclick="" href="#">Họ và tên</a>
                        </th>
                        <th>
                            <a title="Click to sort by this column" onclick="" href="#">Kích hoạt</a>
                        </th>
                        <th>
                            <a title="Click to sort by this column" onclick="" href="#">Chức vụ</a>
                        </th>
                        <th>
                            <a title="Click to sort by this column" onclick="" href="#">Đơn vị</a>
                        </th>
                        <th width="10%">
                            <a title="Click to sort by this column" onclick="" href="#">Bỏ khỏi group</a>
                        </th>
                    </tr>
                </thead>
                
                <tbody>
                    <asp:Repeater ID="rptMembers" runat="server" 
                        onitemcommand="rptMembers_ItemCommand">
                        <ItemTemplate>
                            <tr class="row<%# Container.ItemIndex%2 %>">
                                <td>
                                    <a href='EditUser.aspx?ID=<%#Eval("sAMAccountName") %>'target="_blank">
                                        <%#Eval("sAMAccountName") %></a>
                                </td>
                                <td>
                                    <a href='EditUser.aspx?ID=<%#Eval("sAMAccountName") %>' target="_blank">
                                        <%#Eval("displayName")%>
                                    </a>
                                </td>
                                <td class="center">
                                    <a class="jgrid" title="Unpublish the menu item alias" href=""><span class='state <%#(((long)Eval("userAccountControl")&HTTT.Utilities.Constants.ADS_UF_ACCOUNT_DISABLE)>0)?"unpublish":"public" %> publish'>
                                    </span></a>
                                </td>
                                <td class="center">
                                    <%#Eval("title") %>
                                </td>
                                <td class="center">
                                    <%#Eval("department") %>
                                </td>
                                <td class="center">
                                    <asp:HiddenField ID="hfUsername" Value='<%#Eval("sAMAccountName") %>' runat="server" />
                                    <asp:LinkButton ID="lbtRemoveUser" CommandName="Remove2Group" runat="server">Bỏ</asp:LinkButton>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
            </fieldset>
            </div>
            <!-- Chi tiết group -->

            <div class="width-100 fltlft">
                <fieldset class="adminform">
                    <legend>Thông tin Group</legend>
                    <ul class="adminformlist">
                        <li>
                            <label title="" class="hasTip" for="jform_created_by" id="jform_created_by-lbl">
                                OU
                            </label>
                            <asp:DropDownList ID="ddlOUGroupDetail" runat="server">
                            </asp:DropDownList>
                        </li>
                        <li>
                            <label id="Label14" for="jform_title" class="hasTip required" title="">
                                Tên<span class="star">&nbsp;*</span></label>
                            <asp:TextBox ID="txtName" CssClass="inputbox required txtname"
                                runat="server"></asp:TextBox>
                            <div class="clr">
                            </div>
                        </li>
                        <li>
                            <label id="jform_title-lbl" for="jform_title" class="hasTip required" title="">
                                Mô tả<span class="star">&nbsp;*</span></label>
                            <asp:TextBox ID="txtDescription"  CssClass="inputbox required txtmiddle"
                                runat="server"></asp:TextBox>
                            <div class="clr">
                            </div>
                        </li>
                        <li class="check-box-list">
                            <label id="jform_menutype-lbl" for="jform_menutype" class="hasTip required" title="">
                                Group Scope<span class="star">&nbsp;*</span></label>
                            <asp:RadioButtonList ID="rblGroupScope" runat="server">
                                <asp:ListItem Value = "0">Domain Local</asp:ListItem>
                                <asp:ListItem Value = "1" Selected="True">Global</asp:ListItem>
                                <asp:ListItem Value = "2">Universal</asp:ListItem>
                            </asp:RadioButtonList>
                        </li>
                        <li class="check-box-list">
                            <label id="Label21" for="jform_menutype" class="hasTip required" title="">
                                Group Type<span class="star">&nbsp;*</span></label>
                            <asp:RadioButtonList ID="rblGroupType" runat="server">
                                <asp:ListItem Value = "1">Security</asp:ListItem>
                                <asp:ListItem Value = "0" Selected="True">Distribution</asp:ListItem>
                            </asp:RadioButtonList>
                        </li>
                    </ul>
                </fieldset>
            </div>
        </div>
    </div>
</asp:Content>
